<%--
  Created by IntelliJ IDEA.
  User: DFBZ007
  Date: 2020/8/11
  Time: 16:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<nav id="sidebar">
    <!-- Sidebar Header-->
    <div class="sidebar-header d-flex align-items-center">
        <div id="avatar" class="avatar">
            <c:choose>
                <c:when test="${loginUser.pic==''||loginUser.pic==null}">
                    <img id="sideImg" src="${pageContext.request.contextPath}/img/avatar-6.jpg" alt="..." class="img-fluid rounded-circle">
                </c:when>
                <c:otherwise>
                    <img id="sideImg" src="${loginUser.pic}" alt="..." class="img-fluid rounded-circle">
                </c:otherwise>
            </c:choose>

        </div>
        <div class="title">
            <c:if test="${loginUser.realName==''||loginUser.realName==null}">
                <h1 class="h5">${loginUser.username}</h1>
            </c:if>
            <c:if test="${loginUser.realName!=''||loginUser.realName!=null}">
                <h1 class="h5">${loginUser.realName}</h1>
            </c:if>
            <p>${loginUser.deptName == null || loginUser.deptName == '' ? '暂无部门' : loginUser.deptName}</p>
        </div>
    </div>
    <!-- Sidebar Navidation Menus--><span class="heading">Main</span>
    <ul class="list-unstyled">
        <li class="active"><a href="${pageContext.request.contextPath}/html/home.jsp"> <i class="icon-home"></i>主页 </a></li>
        <li><a href="#userDropdown"  data-toggle="collapse"> <i class="icon-windows"></i>用户列表</a>
            <ul id="userDropdown" class="collapse list-unstyled ">
                <li><a href="${pageContext.request.contextPath}/user/search">查看用户</a></li>
                <li><a href="${pageContext.request.contextPath}/user/findFocus">我关注的用户</a></li>
                <li><a href="${pageContext.request.contextPath}/article/findPage">发布文章</a></li>
                <li><a href="${pageContext.request.contextPath}/article/favoritePage">我的收藏</a></li>
            </ul>
        </li>
        <!--<li><a href="login.html"> <i class="icon-logout"></i>Login page </a></li>-->

        <li><a href="#depDropdown"  data-toggle="collapse"> <i class="icon-windows2"></i>部门列表</a>
            <ul id="depDropdown" class="collapse list-unstyled ">
                <li><a href="${pageContext.request.contextPath}/dept/findAll">全部部门</a></li>
                <li><a href="${pageContext.request.contextPath}/meeting/findPage">会议系统</a></li>
            </ul>
        </li>

    </ul>

</nav>

